package com.tristen.gulimall.gateway.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tristen.gulimall.gateway.dao.WhiteUrlDao;
import com.tristen.gulimall.gateway.entity.WhiteUrlEntity;
import com.tristen.gulimall.gateway.service.WhiteUrlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: lxc
 * @date: 2022/1/9 - 0:40
 */
@Service("whiteUrlService")
public class WhiteUrlServiceImpl implements WhiteUrlService {

    @Resource
    private WhiteUrlDao whiteUrlDao;

    @Override
    public List<WhiteUrlEntity> list() {
        QueryWrapper<WhiteUrlEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper
                .select("url","match_status","usage_status")
                .eq("usage_status", "0");
        return whiteUrlDao.selectList(queryWrapper);
    }
}
